﻿namespace MicroCloud.Authorization
{
    /// <summary>
    /// 实体类：功能信息
    /// </summary>
    [Description("功能信息")]
    [Table(nameof(Function), Schema = TableSchemaConstants.Authorization)]
    [ValueGenerate(ValueGenerateRule.Never, ValueGenerateMode.Snowflake)]
    public class Function : FunctionBase
    {
        /// <summary>
        /// 初始化一个功能信息实体 <see cref="Function"/> 的新实例
        /// </summary>
        public Function()
            : this(null, null)
        { }

        /// <summary>
        /// 初始化一个功能信息实体 <see cref="Function"/> 的新实例
        /// </summary>
        /// <param name="controllerType">控制器类型</param>
        /// <param name="method">功能方法</param>
        public Function(Type controllerType, MethodInfo method = null)
        {
            _controllerType = controllerType;
            _method = method;
        }
    }

}
